<?php require_once ('../common/check.php');  //权限校验 ?>
<?php
//1.引入文件，连接数据库
require('../common/conn.php');
//2.获取所需参数
$id = $_GET['id'];
//3.准备sql语句
$sql = "delete from comment where id = {$id}";
//4.sql语句执行
$result = mysqli_query($link,$sql);
//5.关闭连接
mysqli_close($link);
//6.判断执行结果
if($result == true){
    //7.跳转页面
    header('location:comment_index.php');
}else{
    exit('删除失败');
}

